import request from '@/utils/request'

// 查询开放合作列表
export function listCooperation(query) {
  return request({
    url: '/open/cooperation/list',
    method: 'get',
    params: query
  })
}
export function listCooperationOpen(query) {
  return request({
    url: '/open/cooperation/listOpen',
    method: 'get',
    params: query
  })
}

// 查询开放合作详细
export function getCooperation(id) {
  return request({
    url: '/open/cooperation/' + id,
    method: 'get'
  })
}

// 新增开放合作
export function addCooperation(data) {
  return request({
    url: '/open/cooperation',
    method: 'post',
    data: data
  })
}

// 修改开放合作
export function updateCooperation(data) {
  return request({
    url: '/open/cooperation',
    method: 'put',
    data: data
  })
}

// 删除开放合作
export function delCooperation(id) {
  return request({
    url: '/open/cooperation/' + id,
    method: 'delete'
  })
}
